<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>克隆节点</title>
</head>
<body>
<div class="container">
    <p class="content">文章</p>
</div>
<script>
    var div = document.querySelector('.container');
    //克隆节点 false不克隆后代 true是克隆后代
    var div1 = div.cloneNode(false);
    var div2 = div.cloneNode(true);
    console.log(div1);
    console.log(div2);
</script>
</body>
</html>